#include <stdio.h>

const int MavValue=401;

int main(){

    int array[MavValue];
    int n,i,j,m;
    while (scanf("%d",&n)!=EOF)
    {
        if(n==0)
        {
            break;
        }
        
        for(i=0;i<MavValue;i++)
        {
            array[i]=0;
        }

        for(i=0;i<n;i++)
        {
            scanf("%d",&m);
            array[m]++;
        }

        j=0;
        for(i=0;i<MavValue;i++)
        {
            if(array[i])
            {
                if(j>0)
                {
                    printf(" ");
                }
                printf("%d",i);
                j++;
            }
        }

        printf("\n");
    }
    
    return 0;
}